<?php
class Admin_Model_DbTable_exclusions extends Zend_Db_Table_Abstract
{
	 protected $_name = 'hae_bdd_exclusions';
	 protected $_sequence=true;
     protected $_primary='id';
	public function addexclusions($title_vi, $title_en, $title_ja, $title_cn, $title_fr)
	{
		$data = array(
		'title_vi' => $title_vi,
		'title_en' => $title_en,
		'title_ja' => $title_ja,
		'title_cn' => $title_cn,
		'title_fr' => $title_fr,
		);
		$this->insert($data);
	}
	public function getexclusions($id)
	{
	    $id = (int)$id;
	    $row = $this->fetchRow('id=' . $id);
		if(!$row)
		{ 
			throw  new Exception("Could not find row {$id}");
		}
		return $row->toArray();
	}
	public function updateexclusions($id, $title_vi, $title_en, $title_ja, $title_cn, $title_fr)
	{
		$data = array(
		'title_vi' => $title_vi,
		'title_en' => $title_en,
		'title_ja' => $title_ja,
		'title_cn' => $title_cn,
		'title_fr' => $title_fr,
		);
		$this->update($data, 'id = '. (int)$id);
	}
	public function changestatus($id,$status)
	{
		$data = array(
				'status' => $status,
		);
		$this->update($data, 'id = '. (int)$id);
	}
	public function deleteexclusions($id)
    {
        return $this->delete('id =' . (int)$id);
    }
}
?>